<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>
		window.onload = function() {
			var oDiv = document.getElementById('div1');
			var sTr = oDiv.innerHTML;
			// alert(sTr)
			// oDiv.innerHTML = "修改的文字";
			oDiv.innerHTML = "<a href='http://www.itcast.cn'>传智播客</a>"
		};
	</script>
</head>
<body>
	<div id="div1">这是一个div元素</div>
</body>
</html>